package com.neuedu.hisadmin.controller;
//
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.stereotype.Controller;
//
///**
// * <p>
// *  前端控制器
// * </p>
// *
// * @author jaun
// * @since 2025-07-05
// */
//@Controller
//@RequestMapping("/medicalcard")
//public class MedicalcardController {
//
//}




import com.neuedu.hisadmin.dto.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import com.neuedu.hisadmin.entity.Medicalcard;
import com.neuedu.hisadmin.service.IMedicalcardService;



@RestController
@RequestMapping("/api/medicalcard")
public class MedicalcardController {

    @Autowired
    private IMedicalcardService medicalcardService;

    // 原有接口保持不变...

    // 新增：根据关键词搜索医疗卡
    @GetMapping("/search")
    public Result<List<Medicalcard>> searchByKeyword(
            @RequestParam String keyword
    ) {
        List<Medicalcard> cards = medicalcardService.searchByKeyword(keyword);
        return Result.success(cards);
    }
}